<?php
class LocationDropdown extends Dropdown
{
	function __construct($name, $value)
	{
		parent::__construct($name, (int)$value);
		
		$query = "SELECT Location.nefub_id, CONCAT(Location.name, ', ', Location.city) as name
					FROM Location
					ORDER BY Location.name ASC, Location.city ASC";
		$rows = Database::select_rows_by_query($query);
		$this->addOption('Geen', 0);
		
		foreach ($rows as $row)
		{
			$this->addOption($row['name'], $row['nefub_id']);
		}
		
	}
}